import urllib2, lxml.html
import util, logging, handler

class NexusHandler(handler.GenericHandler):
    service_name = 'Nexus'
  
    def getNewEntries(self):
        # GET web site html
        try:        
            html = util.httpget('https://play.google.com/store/devices/details?id=nexus_4_8gb')
            if html.find('Ausverkauft') == -1:
                return [html]
        except urllib2.URLError as e:
            logging.error(e)
        finally:
            return []

